package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 聊天消息对象 sys_chat_message
 * 
 * @author ruoyi
 */
public class ChatMessage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 消息ID */
    private Long id;

    /** 发送者ID */
    @Excel(name = "发送者ID")
    private String fromUserId;

    /** 接收者ID */
    @Excel(name = "接收者ID")
    private String toUserId;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String content;

    /** 消息类型（0文本 1图片 2语音） */
    @Excel(name = "消息类型", readConverterExp = "0=文本,1=图片,2=语音")
    private String messageType;

    /** 已读状态（0未读 1已读） */
    @Excel(name = "已读状态", readConverterExp = "0=未读,1=已读")
    private String readStatus;
    
    /** 发送状态（0发送中 1已发送 2已送达 3已读） */
    @Excel(name = "发送状态", readConverterExp = "0=发送中,1=已发送,2=已送达,3=已读")
    private String sendStatus;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setFromUserId(String fromUserId) 
    {
        this.fromUserId = fromUserId;
    }

    public String getFromUserId() 
    {
        return fromUserId;
    }

    public void setToUserId(String toUserId) 
    {
        this.toUserId = toUserId;
    }

    public String getToUserId() 
    {
        return toUserId;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setMessageType(String messageType) 
    {
        this.messageType = messageType;
    }

    public String getMessageType() 
    {
        return messageType;
    }

    public void setReadStatus(String readStatus) 
    {
        this.readStatus = readStatus;
    }

    public String getReadStatus() 
    {
        return readStatus;
    }
    
    public void setSendStatus(String sendStatus) 
    {
        this.sendStatus = sendStatus;
    }

    public String getSendStatus() 
    {
        return sendStatus;
    }

    public void setCreateTime(Date createTime) 
    {
        this.createTime = createTime;
    }

    public Date getCreateTime() 
    {
        return createTime;
    }

    @Override
    public String toString() {
        return "ChatMessage [id=" + id + ", fromUserId=" + fromUserId + ", toUserId=" + toUserId + ", content="
                + content + ", messageType=" + messageType + ", readStatus=" + readStatus + ", sendStatus=" + sendStatus
                + ", createTime=" + createTime + "]";
    }
} 